home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6959 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.9 KB  |  55 lines

  1. Path: news.syd.connect.com.au!news
  2. From: Bryan Russell <bryan-r@mis.scitec.com.au>
  3. Newsgroups: comp.lang.c,comp.lang.c++,alt.msdos.programmer,comp.os.msdos.programmer
  4. Subject: Re: Please help (640x480 and linear addressing)
  5. Date: Wed, 21 Feb 1996 14:20:42 +1000
  6. Organization: Connect.com.au P/L, Sydney, Australia
  7. Message-ID: <312A9D9A.262F@mis.scitec.com.au>
  8. References: <4g0god$ntl@news.voicenet.com>
  9. NNTP-Posting-Host: fgate.scitec.com.au
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (Win95; I)
  14.  
  15. Artem Koutchine wrote:
  16. > Hello !
  17. >         I started using Watcom C/C++ (ver 10.5) about a month ago so
  18. > i am not really familiar with using protected mode and all the other
  19. > new things.
  20. >         What i need is to know how to map all video memory in 640x480
  21. > VESA MODE into the linear addressing space.
  22. >         I have very littel idea how to do that, what i know that i need
  23. > to create a separate selector for it, but do i create it ? and how do
  24. > i use it to access that memory ? and is there a simplier way to do that ?
  25. >         I would really appriciate some sample code.
  26. > Please, help me, i am stuck with my work.
  27. > Thanks.
  28. > Artem
  29. > PS: okay, gotta go cook beef stroganoff :))
  30.  
  31. If you are using the DOS4GW extender then you simply start writing at address 
  32. 0xa0000, e.g.  
  33.  
  34. char *screen = 0xa0000;
  35. *screen = colour
  36.  
  37. This will give you access to all 64000 bytes of MODE 13h screen space but unless you 
  38. are planning to code for the VBE 2.0 specs which support linear addressing of the vga 
  39. memory, you will need to change banks at every 64k boundry (that's 64k bytes not 
  40. 64000 bytes). You do this by using one of the vesa int 10 functions. Information can 
  41. be found on this on x2ftp.oulu.fi under the /pub/msdos/programming directory. If you 
  42. have trouble with this I may be able to dig something up.
  43.  
  44.  
  45.  
  46.  
  47. -- 
  48. Bryan Russell                      Net : bryan-r@mis.scitec.com.au
  49.